home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Format CD 42
/
Amiga Format AFCD42 (Issue 126, Aug 1999).iso
/
-serious-
/
comms
/
other
/
recentscript
/
config
/
amftp miami.intro
< prev
next >
Wrap
Text File
|
1999-05-17
|
2KB
|
100 lines
/* ARexx - Download script for AmFTP - Script generated by RecentScript
Miami start/online/offline support by Detlef Wojtaszkiewicz
dwojtaszkiewicz@rios.de
$VER: 1.0 (18.04.99) */
OPTIONS RESULTS
IF ~SHOW('l', "rexxsupport.library") THEN DO
IF ~ADDLIB('rexxsupport.library',0,-30,0) THEN DO
EXIT
END
END
IF (~show('l','rexxreqtools.library')) then
CALL addlib('rexxreqtools.library',-2,-30,0)
CALL rtezrequest('What to do after download?',
,' Go _offline |Stay _tuned| _Quit ',
,,'rt_reqpos = reqpos_centerscr')
IF RTRESULT == 1 THEN DO
CALL GET
CALL OFF
exit
END
IF RTRESULT == 2 THEN DO
CALL GET
EXIT
END
IF RTRESULT == 0 THEN DO
EXIT
END
GET:
IF ~SHOW('P',MIAMI.1) THEN DO
ADDRESS COMMAND
'run <>nil: Miami:Miami'
'sys:rexxc/Waitforport MIAMI.1'
END
ADDRESS MIAMI.1
ISONLINE
IF ~RC THEN DO
ONLINE
END /* Ende Miami-Starter */
oldport = ""
newport = ""
DO i=1 TO 5
port = "AMFTP."i
IF SHOW(PORTS,port) = 1 THEN DO
ADDRESS value port
ISCONNECTED
connectstate = RESULT
IF connectstate = 1 THEN DO
END
ELSE DO
IF oldport = "" THEN oldport = port
END
END
ELSE DO
IF newport = "" THEN newport = port
END
END
IF oldport = "" THEN DO
ADDRESS COMMAND 'run <>NIL: "%3"'
DO 3 WHILE ~SHOW(PORTS,newport)
ADDRESS COMMAND 'WaitForPort 'newport
END
IF RC = 5 THEN DO
EXIT
END
portname = newport
END
ELSE DO
portname = oldport
END
resultport = "RSLT."portname
ADDRESS value portname
CONNECTHOST "%1"
CALL OPENPORT(resultport)
WAITACTION resultport
CALL WAITPKT resultport
ISCONNECTED
connectstate = RESULT
IF connectstate = 0 THEN DO
IF oldport = "" THEN QUIT
ELSE CLOSE
CALL CLOSEPORT resultport
EXIT
END